#include "bsp_led.h"

/**
 * @brief   设置LED状态
 * @param   LEDx: 对应的LED
 * @param   state: 状态
 * @retval  None   
 * @note
*/
void LEDx_SetState(E_LED LEDx, LED_STATUS state)
{
  if(state == LED_OFF)
  {
    if(LEDx == LED0)
    {
      LED0_OFF;
    }

    if(LEDx == LED1)
    {
      LED1_OFF;
    }
  }
  else if(state == LED_ON)
  {
    if(LEDx == LED0)
    {
      LED0_ON;
    }

    if(LEDx == LED1)
    {
      LED1_ON;
    }    
  }   
  else if(state == LED_TOGGLE)
  {
    if(LEDx == LED0)
    {
      LED0_TOGGLE;
    }

    if(LEDx == LED1)
    {
      LED1_TOGGLE;
    }     
  }
}
